In order to transfer a large number of data words between two separate data processing devices in a data processing system, the devices must transmit and receive the data in accordance with a protocol, that is, a predetermined set of rules for data transfer. The performance of the system in interdevice transfers of data is improved when the protocol for these transfers allows for high speed, reliable transmission and reception, and an effective method of recovery from errors. It is desirable that such a protocol be implemented without the use of complex circuitry.
One method of transferring data is to use a completely asynchronous protocol. For this type of protocol, two control lines interconnecting the devices are used for interlocked signal exchange, or "handshaking." A completely asynchronous protocol makes use of two different signals: a DATA VALID (or DATA AVAILABLE) signal and an ACKNOWLEDGE signal. The device that is currently acting as the source or transmitter of a number of multibit data words asserts the DATA VALID signal on one of the two control lines; the device acting as the destination or receiver for the data words asserts the ACKNOWLEDGE signal on the other one of the control lines.
In this method, the source places a single multibit data word on the data lines interconnecting the source and destination devices. A time period is allowed for the data to be "de-skewed," i.e., to settle, and then the source device asserts a DATA VALID signal on the appropriate control line. The destination device waits for receipt of a DATA VALID signal from the source and uses the DATA VALID signal to "strobe in", or accept, the data present on the data lines. In this manner, a single multibit data word is transferred from the source to the destination.
After each data word has been received, the destination device asserts an ACKNOWLEDGE signal on the other control line. The ACKNOWLEDGE signal indicates to the source device that the data word currently on the data line has been properly received. In response to receipt of the ACKNOWLEDGE signal, the destination deasserts the DATA VALID signal and removes the data currently on the data lines. In response to deassertion of the DATA VALID signal by the source, the destination deasserts the ACKNOWLEDGE signal. This sequence completes a single cycle of data transfer, during which a single word of data is transferred from the source to the destination.
The completely asynchronous protocol is a relatively slow method of data transfer. Before each data word can be transferred, the data processing system is delayed for four transmission line time periods while waiting for handshaking signals to complete four trips along the control lines or cables interconnecting the devices, as DATA VALID and ACKNOWLEDGE signals are asserted and deasserted. Additionally, the source and destination devices generally use a synchronizing circuit to synchronize the handshaking signals with a state machine that is internally synchronized with the device.
Another data transfer method that can be used is a completely synchronous protocol. The completely synchronous protocol is very fast when compared with the completely asynchronous protocol, but requires complex circuitry to achieve such high speeds.
In the completely synchronous protocol, the source device places a single multibit data word on the data lines, and then asserts a DATA VALID signal on the appropriate control line. The source then deasserts the DATA VALID signal, and places the next data word on the data lines. The source continues asserting the DATA VALID signal as each data word is placed on the data lines until all the data words have been transmitted. At the destination device, the data words are received as fast as they are transmitted. The destination device must strobe in a new data word each time the DATA VALID signal is asserted. As a result, the destination device is unable to slow down the data flow from the source device.
Other synchronous protocols have been developed in order to provide some flow control between the two devices. In these protocols, the destination device can assert a TRANSMIT OFF signal in order to stop the transmission of data words by the source device. Thus, if a buffer in the destination device is filling up too rapidly with received data words, the TRANSMIT OFF signal is asserted to allow time for the circuitry in the destination device to catch up.
In systems using these synchronous protocols, flow control and error recovery are major problems. A primary reason for the difficulty in resolving these problems is the propagation delay associated with the lines or cables coupling the source and destination devices together. Thus, if the destination device detects a parity error in the received data or has a full data buffer, the source device is sent an indication of the condition (e.g., via an interrupt or a TRANSMIT OFF signal). However, by the time the source device receives this indication, additional data words have been transmitted because the source device does not wait for any ACKNOWLEDGE signal.
In these completely synchronous systems, there is no simple way for the source device to determine which was the last data word transmitted before the destination device requested that the transmission be stopped. If, for example, the source and destination devices are connected by a fifty-foot cable having a propagation delay of approximately 1.8 nanoseconds per foot, there will be a ninety nanosecond period before a signal asserted by one device is received by the other device. If each device uses, for example, an eighty nanosecond clock, the source device will take approximately eighty nanoseconds to transmit each data word. If a transmitted data word contains a parity error, it may take approximately twenty nanoseconds for the destination device to check the parity of the received data word. Additionally, at the source device, it may take approximately two clock cycles, or 160 nanoseconds, for the source device to interpret a TRANSMIT OFF signal or interrupt from the destination device and stop the data transmission. Therefore, in this example, it takes at least 90+20+90+160=360 nanoseconds from the time the data word containing the error is sent until further transmission is stopped. This means that four or five additional data words will be sent after the data word containing the error was transmitted (i.e., 360 nanoseconds divided by the eighty nanosecond data transfer period).
This example illustrates that additional time and software effort is needed in completely synchronous systems in order to recover from an error condition or to execute a transmission stop. If the destination device requests that the transmission be retried by the source device, the source device cannot determine how many data words to retransmit because it is unable to determine how many data words were received by the destination device. Typically, the data buffer in the destination device must be emptied in order to find the erroneous data word. The data buffer in the source device will also be cleared because additional data words were added until transmission was stopped. In addition to requesting a retransmission by the source device, the destination device will need to identify the location of the error using a word (or byte) count, and send this word count identification to the source device. Furthermore, a TRANSMIT OFF signal is ambiguous because of the lack of any ACKNOWLEDGE signals, requiring that the destination device provide some additional indication to the source device of the reason why transmission was stopped.